﻿namespace TDM.WebBase
{
    /// <summary>
    /// 上传json数据转换
    /// </summary>
    public class UploadData
    {
        /// <summary>
        /// 关联的主键
        /// </summary>
        public string id { private get; set; }

        /// <summary>
        /// 文档类型
        /// </summary>
        public int? filetype { get; set; }

        /// <summary>
        /// 保管期限
        /// </summary>
        public int? securityPeriod { get; set; }
        /// <summary>
        /// M级
        /// </summary>
        public int? securityLevel { get; set; }

        /// <summary>
        /// 获得ID值
        /// </summary>
        /// <returns></returns>
        public long? getID()
        {
            long idValue;
            if (long.TryParse(id, out idValue))
            {
                return idValue;
            }
            else
            {
                return null;
            }
        }
    }
}
